﻿using System.Windows;

namespace SocialApi.TestApp.Models
{
    /// <summary>
    /// Помощник окон
    /// </summary>
    public static class ApplicationHelper
    {
        /// <summary>
        /// Скрывает главное окно приложения и показывает <see cref="showingWindow"/>
        /// </summary>
        /// <param name="showingWindow">Новое окно</param>
        public static void Hide(Window showingWindow)
        {
            Application.Current.MainWindow.Hide();
            if (showingWindow == null)
            {
                showingWindow = new Window();
            }
            showingWindow.Show();
        }
    }
}